<?php

function arrayDiff1(){
    $arr1 = array(1,2,3);
    $arr2 = array(4,5,1);
    $res = array_diff($arr1,$arr2);
    print_r($res);
    die();
}

//二维数组取差值
function arrayDiff2(){
    $arr1 = array(
        array(1,2),
        array(3,4),
        array(5,6,7)
    );
    $arr2 = array(
        array(1,2),
        array(2,4)
    );
    $res = array_filter($arr1,function ($value)use($arr2){
        return !in_array($value,$arr2);
    });
    print_r($res);
    die();
}

arrayDiff2();
